package com.css.crm.vo;

import java.io.Serializable;
import java.util.ArrayList;

public class MenuItem implements Comparable<MenuItem>, Serializable, Cloneable{
	

	private static final long serialVersionUID = 1L;
	
	private String menuId;
	private String menuName;
	private Integer menuSeq;
	private String url;
	private String imageUrl;
	private String parentId;
	private ArrayList<MenuFunc> menuFuncList;
	
	public String getMenuId() {
		return menuId;
	}
	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}
	public String getMenuName() {
		return menuName;
	}
	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	public Integer getMenuSeq() {
		return menuSeq;
	}
	public void setMenuSeq(Integer menuSeq) {
		this.menuSeq = menuSeq;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getImageUrl() {
		return imageUrl;
	}
	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}
	public ArrayList<MenuFunc> getMenuFuncList() {
		return menuFuncList;
	}
	public void setMenuFuncList(ArrayList<MenuFunc> menuFuncList) {
		this.menuFuncList = menuFuncList;
	}
	public String getParentId() {
		return parentId;
	}
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	@Override
	public int compareTo(MenuItem o) {
		if ( o != null ){
			return menuSeq - o.getMenuSeq();
		}
		return -1;
	}
	@Override
	public Object clone() {
		MenuItem o = null;
		try {
			o = (MenuItem) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		o.menuId = new String(this.menuId);
		o.menuName = new String(this.menuName);
		o.menuSeq = new Integer(this.menuSeq);
		o.url = new String(this.url);
		o.imageUrl = new String(this.imageUrl);
		o.parentId = new String(this.parentId);
		o.menuFuncList = new ArrayList<MenuFunc>();
		for(MenuFunc mFunc : this.menuFuncList){
			o.menuFuncList.add((MenuFunc) mFunc.clone());
		}
		return o;
	}
}
